using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using Northwoods.Go.Xml;

namespace Rules.Diagram
{
    /// <summary>
    /// 
    /// </summary>
    [Serializable]
    public class OutputInfo : Info
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="node"></param>
        public OutputInfo(RuleNode node) : base(node) { }

        public override String ToString()
        {
            return "Destination: " + this.Destination;
        }

        /// <summary>
        /// 
        /// </summary>
        [Category("Output"), Description("the output destination")]
        public String Destination
        {
            get { return myDestination; }
            set { myDestination = value; }
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="x"></param>
        public override void GenerateAttributes(GoXmlTransformer x)
        {
            x.WriteAttrVal("Destination", this.Destination);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="x"></param>
        public override void ConsumeAttributes(GoXmlTransformer x)
        {
            this.Destination = x.StringAttr("Destination", "");
        }

        private String myDestination = "";
    }
}
